package me.yushuai.wukong.base.api;

import io.swagger.annotations.Api;
import me.yushuai.wukong.base.api.vo.ActionLogVo;
import me.yushuai.wukong.common.dto.PageDTO;
import me.yushuai.wukong.common.exceptin.NotExistException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhoushuai@189.cn
 * @since 2023-10-17
 */
@Api(value = "操作日志API", tags = "wukong-base-svc")
@RestController
public interface ActionLogApi {

    /**
     * 分页查询操作日志
     *
     * @return 分页返回操作日志列表
     */
    @GetMapping("/logs")
    PageDTO<ActionLogVo> pagingSearch();

    /**
     * 查询操作日志的详细信息
     *
     * @param id 操作日志Id
     * @return 返回操作日志详细信息
     * @throws NotExistException 操作日志不存在时抛出异常
     */
    @GetMapping("/log/{id}")
    ActionLogVo getActionLogById(@PathVariable("id") Long id) throws NotExistException;
}
